#include "queue.h"
int main(void)
{
    linkqueue queue;
    initqueue(&queue);
    printf("main queue -> %p\n", &queue);


    printf("front -> %p\n", queue.front);
    printf("rear -> %p\n", queue.rear);

    addItem(&queue, 1);
    addItem(&queue, 2);
    addItem(&queue, 3);

    putchar('\n');
    printf("add after front -> %p\n", queue.front);
    printf("add after rear -> %p\n", queue.rear);

    printqueue(&queue);
    printf("empty = %d\n", isEmpty(&queue));

    int data = 0;
    delItem(&queue, &data);
    delItem(&queue, &data);
    delItem(&queue, &data);
    printf("del data -> %d\n", data);

    printf("empty = %d\n", isEmpty(&queue));
    delItem(&queue, &data);

    printqueue(&queue);
    system("pause");
    return 0;
}